package org.cll.lagou.study.springbootdemo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.cll.lagou.study.springbootdemo.entity.Comment;

/**
 * 描述信息:
 * 评论持久层接口
 * @author CLL
 * @version 1.0
 * @date 2020/6/27 8:13
 */
@Mapper
public interface CommentMapper {

    /**
     * 根据主键查询
     * @param id    主键
     * @return  查询结果
     */
    @Select("select id, content, author, a_id from t_comment where id = #{id}")
    Comment getById(Integer id);
}